package com.mingsoft.basic.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.mingsoft.basic.action.web.LoginAction;
import com.mingsoft.basic.entity.ManagerEntity;

/**
 * 登录的基础应用层
 * 
 * @author walleipt
 *
 */
@Controller
@RequestMapping("/ms")
public class LoginAction_ extends LoginAction
{
	
	/**
	 * 验证登录扩展验证码
	 * 
	 * @param manager
	 *            管理员实体
	 * @param request
	 *            请求
	 * @param response
	 *            响应
	 */
	@RequestMapping(value="/checkLogin",method=RequestMethod.POST)
	public void checkLogin(@ModelAttribute ManagerEntity manager, HttpServletRequest request,
			HttpServletResponse response) {

		if (!this.checkRandCode(request)) {
			this.outJson(response, null, false, this.getResString("err.error", this.getResString("rand.code")));
			return;
		}
		
		super.checkLogin(manager, request, response);
	}

 

}